package com.uzai.console.dto.alarm.alarmrule;

import com.uzai.console.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author liuqi
 * @date 2021年09月01日 19:21
 */
@ApiModel("报警规则详情请求参数对象")
public class AlarmRuleInfoDto extends BaseDto{

    @ApiModelProperty("主键ID（修改时需要，添加不需要）")
    private Long id;

    @ApiModelProperty("设备类型(个人微信:private_wechat；企业微信:work_wechat; 公众号:wx_pub; APP用户:app)")
    private String deviceType;

    @ApiModelProperty("规则名称")
    private String name;

    @ApiModelProperty("客户端退出(0-忽视；1-报警)")
    private Integer clientOut;

    @ApiModelProperty("微信退出(0-忽视；1-报警)")
    private Integer wechatOut;

    @ApiModelProperty("微信假死(0-忽视；1-报警)")
    private Integer wechatDead;

    @ApiModelProperty("设备产品过期(0-忽视；1-报警)")
    private Integer productExpired;

    @ApiModelProperty("软件产品将要到期提醒时间（单位：天）")
    private Integer productExpiredTime;

    @ApiModelProperty("手机电量报警(0-忽视；1-报警)")
    private Integer mobileBattery;

    @ApiModelProperty("手机电量报警值（百分比，默认为20%）")
    private Integer mobileBatteryEnergy;

    @ApiModelProperty("规则内容列表")
    private List<AlarmRuleContentDto> alarmRuleContentList;

    @ApiModelProperty("通道沉默周期(5-5分钟；10-10分钟；15-15分钟；30-30分钟；60-60分钟；180-3小时；360-6小时；720-12小时；1440-24小时)")
    private Integer silentPeriod;

    @ApiModelProperty("生效开始时间(00:00)")
    private String startTime;

    @ApiModelProperty("生效结束时间(23:59)")
    private String endTime;

    @ApiModelProperty("报警联系人id列表")
    private List<Long> alarmContacterIdList;

    @ApiModelProperty("短信报警渠道（0-否；1-是）")
    private Integer alarmTypeMessage;

    @ApiModelProperty("邮箱报警渠道（0-否；1-是）")
    private Integer alarmTypeMail;

    @ApiModelProperty("悠哉公众号报警渠道（0-否；1-是）")
    private Integer alarmTypeWxpub;

    @ApiModelProperty("钉钉报警渠道（0-否；1-是）")
    private Integer alarmTypeDingding;

    @ApiModelProperty("钉钉是否@所有人（0-否；1-是）")
    private Integer alarmTypeDingdingAll;

    @ApiModelProperty("状态（0-关闭；1-开启）")
    private Integer status;

    @ApiModelProperty("remark")
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getClientOut() {
        if(clientOut == null){
            clientOut = 0;
        }
        return clientOut;
    }

    public void setClientOut(Integer clientOut) {
        this.clientOut = clientOut;
    }

    public Integer getWechatOut() {
        if(wechatOut == null){
            wechatOut = 0;
        }
        return wechatOut;
    }

    public void setWechatOut(Integer wechatOut) {
        this.wechatOut = wechatOut;
    }

    public Integer getWechatDead() {
        if(wechatDead == null){
            wechatDead = 0;
        }
        return wechatDead;
    }

    public void setWechatDead(Integer wechatDead) {
        this.wechatDead = wechatDead;
    }

    public List<AlarmRuleContentDto> getAlarmRuleContentList() {
        return alarmRuleContentList;
    }

    public void setAlarmRuleContentList(List<AlarmRuleContentDto> alarmRuleContentList) {
        this.alarmRuleContentList = alarmRuleContentList;
    }

    public Integer getSilentPeriod() {
        return silentPeriod;
    }

    public void setSilentPeriod(Integer silentPeriod) {
        this.silentPeriod = silentPeriod;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public List<Long> getAlarmContacterIdList() {
        return alarmContacterIdList;
    }

    public void setAlarmContacterIdList(List<Long> alarmContacterIdList) {
        this.alarmContacterIdList = alarmContacterIdList;
    }

    public Integer getAlarmTypeMessage() {
        return alarmTypeMessage;
    }

    public void setAlarmTypeMessage(Integer alarmTypeMessage) {
        this.alarmTypeMessage = alarmTypeMessage;
    }

    public Integer getAlarmTypeMail() {
        return alarmTypeMail;
    }

    public void setAlarmTypeMail(Integer alarmTypeMail) {
        this.alarmTypeMail = alarmTypeMail;
    }

    public Integer getAlarmTypeWxpub() {
        return alarmTypeWxpub;
    }

    public void setAlarmTypeWxpub(Integer alarmTypeWxpub) {
        this.alarmTypeWxpub = alarmTypeWxpub;
    }

    public Integer getAlarmTypeDingding() {
        return alarmTypeDingding;
    }

    public void setAlarmTypeDingding(Integer alarmTypeDingding) {
        this.alarmTypeDingding = alarmTypeDingding;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAlarmTypeDingdingAll() {
        return alarmTypeDingdingAll;
    }

    public void setAlarmTypeDingdingAll(Integer alarmTypeDingdingAll) {
        this.alarmTypeDingdingAll = alarmTypeDingdingAll;
    }

    public Integer getProductExpired() {
        if(productExpired == null){
            productExpired = 0;
        }
        return productExpired;
    }

    public void setProductExpired(Integer productExpired) {
        this.productExpired = productExpired;
    }

    public Integer getMobileBattery() {
        return mobileBattery;
    }

    public void setMobileBattery(Integer mobileBattery) {
        this.mobileBattery = mobileBattery;
    }

    public Integer getProductExpiredTime() {
        if(productExpiredTime == null){
            productExpiredTime = 1; //默认为1天
        }
        return productExpiredTime;
    }

    public void setProductExpiredTime(Integer productExpiredTime) {
        this.productExpiredTime = productExpiredTime;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Integer getMobileBatteryEnergy() {
        return mobileBatteryEnergy;
    }

    public void setMobileBatteryEnergy(Integer mobileBatteryEnergy) {
        this.mobileBatteryEnergy = mobileBatteryEnergy;
    }
}
